package com.qdhhxy.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qdhhxy.entity.StuEntity;
import com.qdhhxy.mapper.StudentMapper;
import org.springframework.stereotype.Service;

@Service
public class StuService extends ServiceImpl<StudentMapper, StuEntity> implements IStuService{
    // 分页查询方法
    public IPage<StuEntity> getStuPage(int pageNum, int pageSize) {
        // 创建分页对象
        Page<StuEntity> page = new Page<>(pageNum, pageSize);

        // 查询条件（可以根据需要添加条件）
        QueryWrapper<StuEntity> queryWrapper = new QueryWrapper<>();

        // 执行分页查询
        return page(page, queryWrapper);
    }
}
